<!--
 * @Author: chenzechao
 * @Date: 2024-01-27 17:42:46
 * @LastEditors: chenzechao
 * @LastEditTime: 2024-02-05 17:17:49
 * @FilePath: \accesscontrolui\src\views\xtpz\attendance-group\components\list.vue
 * @Description: 
-->
<template>
  <div>
    <el-table stripe :data="dataList" :header-cell-style="{ 'background-color': 'rgba(201, 215, 242, 1)' }">
      <el-table-column type="index" label="序号" width="100px" align="center"> </el-table-column>
      <el-table-column prop="name" label="考勤组类型"> </el-table-column>
      <el-table-column prop="name" label="考勤组名称"> </el-table-column>
      <el-table-column prop="name" label="创建人"> </el-table-column>
      <el-table-column prop="name" label="创建时间"> </el-table-column>
      <el-table-column prop="name" label="操作">
        <template slot-scope="{ row }">
          <i class="icon icon-pencil-line" @click="handleAdd"></i>
          <i class="icon icon-trash" @click="handleDel"></i>
        </template>
      </el-table-column>
    </el-table>
    <Pagination
      :total="total"
      :currentNumber="pageNum"
      :currentSize="pageSize"
      @change-number="changeNumber"
      @change-size="changeSize"
    >
      <el-button
        size="small"
        @click="handleAdd"
        type="handle"
        icon="el-icon-circle-plus-outline"
        >新建考勤组</el-button
      >
    </Pagination>
    <!-- <Details ref="detailsRef"></Details>
    <delete-dialog ref="deleteRef"></delete-dialog>
    <import-dialog ref="importRef"></import-dialog> -->
  </div>
</template>
<script>
import Pagination from "@/components/Pagination/index.vue";
// import Details from "./details.vue";
// import DeleteDialog from "./delete-dialog.vue";
// import ImportDialog from "./import-dialog.vue";
export default {
  inheritAttrs:true,
  components: {
    Pagination,
    // Details,
    // DeleteDialog,
    // ImportDialog
  },
  props: {
    total: {
      type: Number,
      default: 10,
    },
    pageSize: {
      type: Number,
      default: 10,
    },
    pageNum: {
      type: Number,
      default: 1,
    },
    dataList: {
      type: Array,
      default: () => [],
    },
    listType: {
      type: String,
      default: "free",
    },
  },
  methods: {
    handleImport() {
         this.$refs.importRef.open();   
    },
    handleRecord() {
      this.$refs.attendanceRef.open();
    },
    changeNumber() {},
    changeSize() {},
    handleEdit() {
      this.$refs.detailsRef.open();
    },
    handleAdd(id) {
      this.$emit('add-attendance',id)
    },
    handleDel() {
      this.$refs.deleteRef.open();
    },
  },
};
</script>
